Query the query condition from a URL and encode or decode a URL
Use the url_extract_query function to obtain the query condition from a URL. Use the url_encode function to encode a URL. Use the url_decode function to decode a URL.
SQL
* |
select
url_extract_query(
'https://sls.console.aliyun.com/project/dashboard-demo/categoryList?userid=xiaoming'
) as query,
url_encode('http://www.aliyun.com:80/product/sls') as encode,
url_decode(
'http%3A%2F%2Fwww.aliyun.com%3A80%2Fproduct%2Fsls'
) as decode